#pragma once


#include <XnCppWrapper.h>
#include "CSkeleton.h"
#include "CPlayer.h"
using namespace xn;

class CDisplay
{
public:
	CDisplay();
	~CDisplay();
	CDisplay(int win_x, int win_y, DepthGenerator* D, DepthMetaData* DMD);

	void SetRes(int x, int y) {Xres = x; Yres = y;}
	void SetUser(UserGenerator U, XnUserID I) {user = U; uID = I; valid = true;}
	void SetDepth(DepthGenerator* D) {depth = D;}
	void LostUser(XnUserID I);
	void ScalePoint(XnPoint3D& point);

	void EvalSkeleton();

	bool Draw();
	bool DrawSkeleton();

	void Play() {P.Play();} //Play if it's not playing already 

private:
	//List of user IDs, skeletons? deal with that here?
	//Needs the size of the window as well as the starting coordinates
	int mX, mY;
	int Xres, Yres;
	int count; //how many pts since last eval
	bool valid;
	UserGenerator user; //User generator
	DepthGenerator* depth; //Depth generator
	DepthMetaData* depthMD; 
	XnUserID uID; //User ID

	XnConfidence minConf; //Only use data above a certain confidence

	CSkeleton S;
	CPlayer P;

};